#include "LinearMath/btTransformUtil.h"
#ifdef __cplusplus
extern "C" {
#endif
btTransformUtil* bullet_NewbtTransformUtil(){
	btTransformUtil* wrap_out = new btTransformUtil();
	return wrap_out;
}

void bullet_btTransformUtil_calculateDiffAxisAngle(btTransformUtil* c_this,btTransform* transform0,btTransform* transform1,btVector3* axis,double* angle){
	btTransform const& c_arg_transform0=(btTransform const&)(*transform0);
	btTransform const& c_arg_transform1=(btTransform const&)(*transform1);
	btVector3& c_arg_axis=(btVector3&)(*axis);
	btScalar& c_arg_angle=(btScalar&)(*angle);
	c_this->calculateDiffAxisAngle(c_arg_transform0,c_arg_transform1,c_arg_axis,c_arg_angle);
}

void bullet_btTransformUtil_calculateDiffAxisAngleQuaternion(btTransformUtil* c_this,btQuaternion* orn0,btQuaternion* orn1a,btVector3* axis,double* angle){
	btQuaternion const& c_arg_orn0=(btQuaternion const&)(*orn0);
	btQuaternion const& c_arg_orn1a=(btQuaternion const&)(*orn1a);
	btVector3& c_arg_axis=(btVector3&)(*axis);
	btScalar& c_arg_angle=(btScalar&)(*angle);
	c_this->calculateDiffAxisAngleQuaternion(c_arg_orn0,c_arg_orn1a,c_arg_axis,c_arg_angle);
}

void bullet_btTransformUtil_calculateVelocity(btTransformUtil* c_this,btTransform* transform0,btTransform* transform1,double timeStep,btVector3* linVel,btVector3* angVel){
	btTransform const& c_arg_transform0=(btTransform const&)(*transform0);
	btTransform const& c_arg_transform1=(btTransform const&)(*transform1);
	btScalar c_arg_timeStep=timeStep;
	btVector3& c_arg_linVel=(btVector3&)(*linVel);
	btVector3& c_arg_angVel=(btVector3&)(*angVel);
	c_this->calculateVelocity(c_arg_transform0,c_arg_transform1,c_arg_timeStep,c_arg_linVel,c_arg_angVel);
}

void bullet_btTransformUtil_calculateVelocityQuaternion(btTransformUtil* c_this,btVector3* pos0,btVector3* pos1,btQuaternion* orn0,btQuaternion* orn1,double timeStep,btVector3* linVel,btVector3* angVel){
	btVector3 const& c_arg_pos0=(btVector3 const&)(*pos0);
	btVector3 const& c_arg_pos1=(btVector3 const&)(*pos1);
	btQuaternion const& c_arg_orn0=(btQuaternion const&)(*orn0);
	btQuaternion const& c_arg_orn1=(btQuaternion const&)(*orn1);
	btScalar c_arg_timeStep=timeStep;
	btVector3& c_arg_linVel=(btVector3&)(*linVel);
	btVector3& c_arg_angVel=(btVector3&)(*angVel);
	c_this->calculateVelocityQuaternion(c_arg_pos0,c_arg_pos1,c_arg_orn0,c_arg_orn1,c_arg_timeStep,c_arg_linVel,c_arg_angVel);
}

void bullet_btTransformUtil_integrateTransform(btTransformUtil* c_this,btTransform* curTrans,btVector3* linvel,btVector3* angvel,double timeStep,btTransform* predictedTransform){
	btTransform const& c_arg_curTrans=(btTransform const&)(*curTrans);
	btVector3 const& c_arg_linvel=(btVector3 const&)(*linvel);
	btVector3 const& c_arg_angvel=(btVector3 const&)(*angvel);
	btScalar c_arg_timeStep=timeStep;
	btTransform& c_arg_predictedTransform=(btTransform&)(*predictedTransform);
	c_this->integrateTransform(c_arg_curTrans,c_arg_linvel,c_arg_angvel,c_arg_timeStep,c_arg_predictedTransform);
}

btConvexSeparatingDistanceUtil* bullet_NewbtConvexSeparatingDistanceUtil(double boundingRadiusA,double boundingRadiusB){
	btScalar c_arg_boundingRadiusA=boundingRadiusA;
	btScalar c_arg_boundingRadiusB=boundingRadiusB;
	btConvexSeparatingDistanceUtil* wrap_out = new btConvexSeparatingDistanceUtil(c_arg_boundingRadiusA,c_arg_boundingRadiusB);
	return wrap_out;
}

double bullet_btConvexSeparatingDistanceUtil_getConservativeSeparatingDistance(btConvexSeparatingDistanceUtil* c_this){
	btScalar c_out = c_this->getConservativeSeparatingDistance();
	double wrap_out = (c_out);
	return wrap_out;
}

void bullet_btConvexSeparatingDistanceUtil_initSeparatingDistance(btConvexSeparatingDistanceUtil* c_this,btVector3* separatingVector,double separatingDistance,btTransform* transA,btTransform* transB){
	btVector3 const& c_arg_separatingVector=(btVector3 const&)(*separatingVector);
	btScalar c_arg_separatingDistance=separatingDistance;
	btTransform const& c_arg_transA=(btTransform const&)(*transA);
	btTransform const& c_arg_transB=(btTransform const&)(*transB);
	c_this->initSeparatingDistance(c_arg_separatingVector,c_arg_separatingDistance,c_arg_transA,c_arg_transB);
}

void bullet_btConvexSeparatingDistanceUtil_updateSeparatingDistance(btConvexSeparatingDistanceUtil* c_this,btTransform* transA,btTransform* transB){
	btTransform const& c_arg_transA=(btTransform const&)(*transA);
	btTransform const& c_arg_transB=(btTransform const&)(*transB);
	c_this->updateSeparatingDistance(c_arg_transA,c_arg_transB);
}

#ifdef __cplusplus
}
#endif
